package tests_unitaires;

import metier.Case;
import metier.Joker;
import metier.Plateau;

public class JokerTest extends junit.framework.TestCase {

	public void testIsDeplacable() {
		Plateau p = new Plateau();
		Case c1 = new Case(0, 2, p);
		Case c2 = new Case(1, 1, p);
		Joker j = new Joker(1, 0);
		c1.attribuerJeton(j);
		assertTrue((j.getDeplacement() > 0) == j.peutDeplacer());
		c1.deplacerJeton(c2);
		assertTrue(!j.peutDeplacer() == (j.getDeplacement() == 0));

	}

}
